﻿
Partial Class WebForm_ManageImpersonation
    Inherits System.Web.UI.Page

    Protected Modeler As New MyModeler(Me)
    Protected Viewer As New MyViewer(Me)

    Public Class MyViewer
        Inherits MyMVC.ViewerBase
        Private outer As WebForm_ManageImpersonation

        Public Sub New(ByVal outer As WebForm_ManageImpersonation)
            MyBase.New(outer)
            Me.outer = outer
        End Sub

#Region "PL"
        '設定UI
#End Region

#Region "PL - 加入請選擇/全部選項至 DropDownList"

#End Region
    End Class

    Public Class MyModeler
        Inherits MyMVC.ModelerBase
        Private outer As WebForm_ManageImpersonation

        Public Sub New(ByVal outer As WebForm_ManageImpersonation)
            MyBase.New(outer)
            Me.outer = outer
        End Sub

#Region "BLL-Property"

#End Region

#Region "BLL-Method"
        Public Sub Login()
            outer.Server.Transfer("~/default.aspx")
        End Sub
#End Region

#Region "BLL-Validator"
        'Custom validator
#End Region

#Region "DAO"
        '用於較複雜之資料存取
#End Region
    End Class

#Region "CTL-Action Dispatching"
    '依據請求執行 (例如 GridView.Editing)
#End Region

#Region "CTL-Method"

#End Region

#Region "CTL-Event Declaration"
    Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
        Me.Modeler.Login()
    End Sub
#End Region

#Region "Data"
    '物件溝通必須資料

    Public ReadOnly Property UserID() As String
        Get
            Return Me.txtUserID.Text
        End Get
    End Property

#End Region
    '2. Naming convention
    'member variable - 第一個字母大寫, 使用時變需加入 Me (vb) / this (c#)
    'local variable - 第一個字母小寫


End Class
